package com.zidian.teacher.fragment;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import com.zidian.teacher.R;
import com.zidian.teacher.common.BaseFragment;

import com.zidian.teacher.activity.CourseListActivity;
import com.zidian.teacher.activity.TeachingWorkListActivity;

/**
 * Created by Administrator on 2016/9/5 0005.
 */
public class TeachingFragment extends BaseFragment {

    private LinearLayout Work;
    private LinearLayout Student;

    @Override
    protected int getLayoutId() {
        return R.layout.tab_fragment_teaching;
    }

    public static TeachingFragment newInstance() {
        return new TeachingFragment();
    }


    @Override
    protected void initView(View view, Bundle savedInstanceState) {

        Work = (LinearLayout) view.findViewById(R.id.teaching_work);
        Student = (LinearLayout) view.findViewById(R.id.teaching_student);

        Work.setOnClickListener(mListener);
        Student.setOnClickListener(mListener);

    }


    private View.OnClickListener mListener = new View.OnClickListener() {
        @Override
        public void onClick(View view) {

            switch (view.getId()) {
                case R.id.teaching_student:
//                    startActivity(TeachingStudentListActivity.class);
                    startActivity(CourseListActivity.class);
                    break;
//                case R.id.interaction_material:
//                    startActivity(InteractionMaterialAct.class);
//                    break;
                case R.id.teaching_work:
                    startActivity(TeachingWorkListActivity.class);
                    break;
            }

        }
    };
}
